<?php
	Cache::getInstance()->loadCache('goods_color');
	$cate_options = '';
	FS('Share')->getShareCateOptions(0,$cate_options);
?>
<div id="publish_topic" class="pub_box">
<form method="post" id="exchange_share_post">
	<span class="pub_tit">活动讨论</span>
	<input type="hidden" name="share_id" value="" />
	<div class="pub_edit r5">
		<div>
			<span class="fw_count">{sprintf char_check 140}</span>
		</div>
		<div class="pub_expands">
			<div class="fl pub_expand" style="display:none;">
				<ul class="pub_image_box PUB_IMG"></ul>
				<div class="pub_goods_detailed PUB_GOODS_DETAILED" direction="r">
					<div>
						<label>宝贝价格：</label>
						<span class="PGD_PRICE">¥69.99</span>
						<label style="margin:0 0 0 20px;" class="PGD_COMMISSION">可获积分：</label>
						<span class="PGD_COMMISSION"></span>
					</div>
					<div>
						<label>宝贝分类：</label>
						<select class="PGD_GOODSCATE">
							<option value="0">请选择分类</option>
							{$cate_options}
						</select>
						<span class="PGD_GOODSCATESTR"></span>
					</div>
					<div style="margin:5px 0 0 0;">
						<label>宝贝颜色：</label>
						<!--{loop $_FANWE['cache']['goods_color'] $color}-->
						<a class="colorblock" href="javascript:;" title="{$color['name']}" style="background:{if !empty($color['icon'])}url({getimg $color['icon'] 0 0}){else}{$color['color']}{/if};" colorID="{$color['id']}"><span></span></a>
						<!--{/loop}-->
					</div>
					<div style="margin:5px 0 0 0;">
						<label>宝贝描述：</label>
						<input type="text" class="textinput PGD_GOODSALT" style="width:167px;"/>
					</div>
					<a class="pgd_close PGD_CLOSE">关闭</a>
				</div>
				<div class="pub_photo_detailed PUB_PHOTO_DETAILED">
					<div>
						<label>图片描述：</label>
					</div>
					<div>
						<textarea class="textarea PHD_PHOTOALT" style="width:228px; height:64px;"></textarea>
					</div>
					<a class="phd_close PHD_CLOSE">关闭</a>
				</div>
				<input type="hidden" class="SHARE_TYPE" name="share_type" value="default"/>
			</div>
		</div>
		<textarea name="content" id="publish_topic_content" class="PUB_TXT pub_txt fl rl5" length="140" position="0">{$post_topic_content}</textarea>
		<!--{if $_FANWE['uid'] == 0}-->
		<input type="button" class="pub_btn fl rr5" value="登录" style="color:#CCC" onclick="exchangeLogin();" />
		<!--{else}-->
		<input type="button" class="pub_btn fl rr5" value="{lang publish}" onclick="$.Topic_Post_Save(this)" />
		<!--{/if}-->
		<input type="hidden" name="id" value="{$info['id']}" />
		<input type="hidden" name="module" value="exchange" />
		<input type="hidden" name="action" value="post" />
		<!--{if $_FANWE['setting']['share_is_tag'] == 1}-->
        <div class="fl pub_tags PUB_SHARE_TAG_BOX" style="display:none;">
            <span class="fl tag_title">{lang tag}：</span>
            <input type="text" class="fl tag_txt PUB_SHARE_TAG" name="tags" title="{sprintf share_tag_tip $_FANWE['setting']['share_tag_count']}" />
            <ul></ul>
        </div>
		<!--{/if}-->
		<!--{if $_FANWE['uid'] > 0}-->
		<div class="pub_ext">
			<div class="pub_opt fl">
				<span class="fl">{lang add}：</span>
				<a class="add_face fl" style="background-position:0 -2px;" href="javascript:;" onclick="$.Show_Expression(this)" w="tpk">{lang face}</a>
				<a style="background-position:0 -74px;" href="javascript:;" w="tpk" class="add_goods fl" onclick="$.Goods_Add(this)">{lang goods}</a>
				<a class="add_pic fl" href="javascript:;" style="background-position:0 -26px;" w="tpk" onclick="$.Pic_Add(this)">{lang photo}</a>
				<a class="add_at fl" href="javascript:;" onclick="$.At_Add(this)" style="background-position:-87px -156px;">朋友</a>
            </div>
			<div class="pub_out fr">
				<input type="checkbox" checked="checked" name="pub_out_check" value="1">
				<label for="pub_out_check">{lang sync}</label>（<a href="{u settings/bind}" target="_blank">{lang settings}</a>）
			</div>
		</div>
		<!--{/if}-->
	</div>
	<div class="clear"></div>
</form>
</div>
<div class="clear"></div>
<script type="text/javascript">
jQuery(function($){
	$.Share_Publish_Init($("#exchange_share_post"));
});

function exchangeLogin()
{
	var fun = function(){
		window.location.reload(true);
	}
	FANWE.LOGIN_RESULT_FUNC	= fun;
	$.Show_Login_Form();
}
</script>